<template>
  <div class="goodtab">
    <nav-bar></nav-bar>
    <sticky-box class="sticky">
      <template>
        <control :datas="control"></control>
      </template>
    </sticky-box>
    <contents :datas="content"></contents>
  </div>
</template>

<script>
import NavBar from "components/private/good_tab/GoodTabNavBar";
import Control from "components/private/good_tab/GoodTabControl";
import Contents from "components/private/good_tab/GoodTabContent";

import StickyBox from "components/public/sticky_box/StickyBox";
export default {
  name: "GoodTab",
  data() {
    return {
      control: null,
      content:null
    };
  },
  methods: {
    request() {
      this.$axios({
        url: "/querytab",
        method: "get"
      }).then(res => {
        this.content = res.goods;
        this.control=res.categroy;
      });
    }
  },
  created() {
    this.request();
  },
  components: {
    NavBar,
    Control,
    Contents,
    StickyBox
  }
};
</script>

<style lang="less" scoped>
.goodtab {
  padding-top: 45PX;
  
}
.sticky{
  top: 45PX;
}
</style>